from selenium import webdriver

driver = webdriver.Chrome()
driver.get(url='https://mail.163.com/')

# 1.切换到iframe子页面
inode = driver.find_element_by_xpath('//div[@id="loginDiv"]/iframe')
driver.switch_to.frame(inode)
# 2.找到用户名、密码、登录三个节点并执行相对应的操作
driver.find_element_by_name('email').send_keys('wangweichao_2020')
driver.find_element_by_name('password').send_keys('zhanshen001')
driver.find_element_by_id('dologin').click()



















